import request from '@/utils/request'

export function selectPages(data) {
  return request({
    url: 'api/workCalendar/selectPages',
    method: 'get',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/workCalendar/del',
    method: 'post',
    data: ids
  })
}

export function add(data) {
  return request({
    url: 'api/workCalendar/add',
    method: 'post',
    data
  })
}

export function addDefaultWorkCalendar(data) {
  return request({
    url: 'api/workCalendar/addDefaultWorkCalendar',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'api/workCalendar/edit',
    method: 'post',
    data
  })
}

export function goEdit(dateTime) {
  return request({
    url: 'api/workCalendar/goEdit?dateTime=' + dateTime,
    method: 'get'
  })
}

export function getDefaultWorkCalendar() {
  return request({
    url: 'api/workCalendar/getDefaultWorkCalendar',
    method: 'get'
  })
}

export function checkData(data) {
  return request({
    url: 'api/workCalendar/checkData',
    method: 'post',
    data
  })
}

export default { selectPages, del, add, edit, goEdit, checkData, getDefaultWorkCalendar, addDefaultWorkCalendar }
